package cc.yugu.yhdw.webserver.service.hdw;

import cc.yugu.yhdw.common.domain.hdw.SupplierInOutMoney;
import cc.yugu.yhdw.common.entity.pagination.Page;
import cc.yugu.yhdw.webserver.persistence.hdw.SupplierInOutMoneyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 厂商资金流水业务
 * 
 * @Date:Created in 2018/7/10 17:10
 * @Author:
 * @Modified By: zjn 2018/7/10 17:10
 */ 
@Service
public class SupplierInOutMoneyService {

    @Autowired
    SupplierInOutMoneyMapper supplierInOutMoneyMapper;
    /**
    * 分页查询
    * 
    * @Param: [search]
    * @Return: cc.yugu.yhdw.common.entity.pagination.Page
    * @Author By: zjn 2018/7/10  17:10
    */ 
    public Page findPage(SupplierInOutMoney search) {
        Page page = search.buildPage();
        page.setTotalItems(supplierInOutMoneyMapper.findPageCount(search));
        search.setBeginIndex(page.getOffset());
        page.setResult(supplierInOutMoneyMapper.findPageResult(search));

        return page;
    }
}
